def cal(n):
    if n == 0:
        return 1
    return n*cal(n-1)
num = int(input("输入非零数"))
print(cal(num))